<h2>题目编号 : 192</h2>
<div style="color:#666;font-size:80%;">03 May 2008</div><br />
<div class="problem_content">
<p>Let <var>x</var> be a real number.<br />
A <i>best approximation</i> to <var>x</var> for the <i>denominator bound</i> <var>d</var> is a rational number <var>r</var>/<var>s</var> <i>in reduced form</i>, with <var>s</var> <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> <var>d</var>, such that any rational number which is closer to <var>x</var> than <var>r</var>/<var>s</var> has a denominator larger than <var>d</var>:</p>

<div style="text-align:center;">|<var>p</var>/<var>q</var>-<var>x</var>| <img src='images/symbol_lt.gif' width='10' height='10' alt='&lt;' border='0' style='vertical-align:middle;' /> |<var>r</var>/<var>s</var>-<var>x</var>| <img src='images/symbol_implies.gif' width='15' height='11' alt='&rArr;' border='0' style='vertical-align:middle;' /> <var>q</var> <img src='images/symbol_gt.gif' width='10' height='10' alt='&gt;' border='0' style='vertical-align:middle;' /> <var>d</var></div>

<p>For example, the best approximation to <img src='images/symbol_radic.gif' width='14' height='16' alt='&radic;' border='0' style='vertical-align:middle;' />13 for the denominator bound 20 is 18/5 and the best approximation to <img src='images/symbol_radic.gif' width='14' height='16' alt='&radic;' border='0' style='vertical-align:middle;' />13 for the denominator bound 30 is 101/28.</p>

<p>Find the sum of all denominators of the best approximations to <img src='images/symbol_radic.gif' width='14' height='16' alt='&radic;' border='0' style='vertical-align:middle;' /><var>n</var> for the denominator bound 10<img src="" style="display:none;" alt="^(" /><sup>12</sup><img src="" style="display:none;" alt=")" />, where <var>n</var> is not a perfect square and 1 <img src='images/symbol_lt.gif' width='10' height='10' alt='&lt;' border='0' style='vertical-align:middle;' /> <var>n</var> <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' /> 100000.</p>
</div><br />
